<?php

class ChanPinModel extends Model{
	
	protected $add_url  = 'http://139.224.31.151/app/templateAction/saveSMSTemplate';
	
	//品项追踪列表
	protected $list_url = 'http://139.224.31.151/app/member/productTrackingAction/gainAllProductTracking';
	
	//短信、电话、反馈明细URL
	protected $product_feed_url  = 'http://139.224.31.151/app/member/productTrackingAction/getAllTrackingDetails';

	//品项追踪详情
	protected $product_url_detail = 'http://139.224.31.151/app/member/productTrackingAction/getProductTrackingDetails';
	
	protected $product_save_feed_url = 'http://139.224.31.151/app/member/productTrackingAction/insertTrackIngDetails';

	protected $save_add_url 	= 'http://139.224.31.151/app/member/productTrackingAction/saveTest';  //新增保存

	public function newone($data){
		$url = $this->add_url;
		$return = ApiCommon($url, $data);
		return $return;
	}
	
	public function getlist() {
		$where = $this->options['where'];
		$return = ApiCommon($this->list_url, $where);
		return $return;
	}
	
	public function getDetail() {
		$where = $this->options['where'];
		$return = ApiCommon($this->product_url_detail, $where);
		return $return;
	}
	
	public function getfeedByType() {
		$where = $this->options['where'];
		if (array_key_exists('id',$where))  //PHP自动多加了id参数，有就去掉
			unset($where['id']); 
		
		$return = ApiCommon($this->product_feed_url, $where);
		return $return;
	}
	
	public function saveFeed($data){
		$url = $this->product_save_feed_url;
		$return = ApiCommon($url, $data);
		return $return;
	}
	
	public function addSave($data){
		$url = $this->save_add_url;
		$return = ApiCommon($url, $data);
		return $return;
	}
	

	
	
	
	
	
	
	

	
}

?>